<template>
  <fieldset>
    <legend>父组件</legend>
    <!-- <h1>一个朴实无华的父组件</h1>
    <Child :g="gift" @re="get" />
    <Child2 /> -->
    <modal :visible="isShow" @ok='handleOk' @cancle="handleCancle">
      <template v-slot:title>
        <h3>退款提示</h3>
      </template>
      <template v-slot:body>
        <h4>您正在取消购买小天鹅</h4>
      </template>
    </modal>
    <!-- <modal :visible="state" @confirm="isOpen"></modal> -->
    <button @click="showModal" class="open">打开模态框</button>
  </fieldset>
</template>

<script>
import Child from "./Child.vue";
import Child2 from "./Child2.vue";
import Modal from '@/components/modal';
import modalMix from "@/mixins/modal"   //混入对象modal.js

export default {
  components: {
    Child,
    Child2,
    Modal
  },
  mixins: [modalMix]
}
</script>
